#ifndef CRITERION_H
#define CRITERION_H

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "debug.h"

#include "file.h"

typedef enum {CRIT_EQ, CRIT_L, CRIT_G, CRIT_LE, CRIT_GE} criterionOperator;
typedef enum {CRIT_FILENAME, CRIT_FILESIZE} criterionField;
typedef struct 
{
  criterionOperator operator;
  criterionField field;
  char* data;
} criterion;

criterion* createCriterion(criterionOperator op, criterionField field, char* data);
void freeCriterion(criterion* c);
int validateCriterion(criterion* c, file* f);
void dumpCriterion(criterion* c);
#endif // CRITERION_H
